import js from '@eslint/js'
import pluginVue from 'eslint-plugin-vue'
import skipFormatting, { ignores } from '@vue/eslint-config-prettier/skip-formatting'
import { rules } from 'eslint-plugin-vue'

export default [
  {
    name: 'app/files-to-lint',
    files: ['**/*.{js,mjs,jsx,vue}'],
  },

  {
    name: 'app/files-to-ignore',
    ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**'],
  },
  {
  rules:
    {
      'prettier/prettier': [
       'warn',
       {
         singleQuote: true,
         semi:false,
         printWidth:80,
         trailingComma:'none',
         endOfLine:'auto'
       },
     ],
     'vue/multi-word-component-names':[
      'warn',
      {
        ignores:['index']
      }
     ],
     'vue/no-setup-props-destructure':['off'],
     'no-undef':'error'
         
    }, 
   },

  js.configs.recommended,
  ...pluginVue.configs['flat/essential'],
  skipFormatting,
]
